package com.onland.dfish.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.util.Date;

/**
 * 评论实体类
 */
@Data
@Alias("comments")
@TableName("`t_comments`")
public class Comments {
    /**
     * 评论id
     */
    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Integer commentsId;
    /**
     * 评论内容
     */
    @TableField(value = "content")
    private String content;
    /**
     *评论点赞数
     */
    @TableField(value = "like_num")
    private Integer likeNum;

    /**
     * 视频id
     */
    @TableField(value = "video_id")
    private Integer videoId;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 评论添加时间
     */
    @TableField(value = "add_time")
    private Date addTime;

    @Override
    public String toString() {
        return "Comments{" +
                "id=" + commentsId +
                ", content='" + content + '\'' +
                ", likeNum=" + likeNum +
                ", videoId=" + videoId +
                ", userId=" + userId +
                ", addTime=" + addTime +
                '}';
    }
}
